home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
AdobeExamples
/
NX_LineDraw
/
DrawViewWraps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-12
|
28KB
|
835 lines
/* DrawViewWraps.c generated from DrawViewWraps.psw
by unix pswrap V1.009 Wed Apr 19 17:50:24 PDT 1989
*/
#include <dpsclient/dpsfriends.h>
#include <string.h>
#line 1 "DrawViewWraps.psw"
/*
* (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
*
* (b) If this Sample Code is distributed as part of the Display PostScript
* System Software Development Kit from Adobe Systems Incorporated,
* then this copy is designated as Development Software and its use is
* subject to the terms of the License Agreement attached to such Kit.
*
* (c) If this Sample Code is distributed independently, then the following
* terms apply:
*
* (d) This file may be freely copied and redistributed as long as:
* 1) Parts (a), (d), (e) and (f) continue to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* (e) PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
*
* (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
* CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
* AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
* ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
* OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
* WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
* WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
* DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS.
*/
/*
* DrawViewWraps.psw
*
* Here lie the wraps used in DrawView.m for the LineDrawing application.
* Several ways to draw lines are shown here. One that is not is to use the
* single operator functions from the method directly.
*
* PostScript operators obtain their operands from the stack.
* As a result the order of placing the operands on the stack is very important.
* In the examples below, comments are used in the bound procedures
* to indicate the operands on stack when the procedure is called.
* One common problem area is to inadvertently place the operands on
* stack in the wrong order.
*
* Version: 2.0
* Author: Ken Anderson, Ken Fromm
* History:
* 03-07-91 Added this comment.
*/
/* StartTime is stored in the interpreter and contains the initial real time */
#line 63 "DrawViewWraps.c"
void PSWMarkTime( void )
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 3, 28,
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* StartTime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328}, /* realtime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"StartTime"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
}
#line 56 "DrawViewWraps.psw"
/* The difference between the current real time and the initial time stored */
/* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
#line 106 "DrawViewWraps.c"
void PSWReturnTime(int *ElapsedTime)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjGeneric obj4;
DPSBinObjGeneric obj5;
DPSBinObjGeneric obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 9, 76,
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328}, /* realtime */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* StartTime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169}, /* sub */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119}, /* printobject */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119}, /* printobject */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70}, /* flush */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
DPSResultsRec _dpsR[1];
static const DPSResultsRec _dpsRstat[] = {
{ dps_tInt, -1 },
};
_dpsR[0] = _dpsRstat[0];
_dpsR[0].value = (char *)ElapsedTime;
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"StartTime"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[1].val.nameVal = _dpsCodes[0];
DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
DPSAwaitReturnValues(_dpsCurCtxt);
}
#line 63 "DrawViewWraps.psw"
/*
* This wrap is called in the +newFrame:(NXRect *) frm method to
* define and bind procedures in the interpreter. These procedures
* are then called from within other wraps. Binding replaces each
* executable operator name with its value. During execution of the
* procedures, the interpreter encounters the operators themselves
* instead of the names of the operators. A procedure that has been
* bounded will execute faster than one that has not been bound.
* Certain caveats pertain; see the red book for further information.
*/
#line 178 "DrawViewWraps.c"
void PSWDefs( void )
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjGeneric obj4;
DPSBinObjGeneric obj5;
DPSBinObjGeneric obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
DPSBinObjGeneric obj9;
DPSBinObjGeneric obj10;
DPSBinObjGeneric obj11;
DPSBinObjGeneric obj12;
DPSBinObjGeneric obj13;
DPSBinObjGeneric obj14;
DPSBinObjGeneric obj15;
DPSBinObjGeneric obj16;
DPSBinObjGeneric obj17;
DPSBinObjGeneric obj18;
DPSBinObjGeneric obj19;
DPSBinObjGeneric obj20;
DPSBinObjGeneric obj21;
DPSBinObjGeneric obj22;
DPSBinObjGeneric obj23;
DPSBinObjGeneric obj24;
DPSBinObjGeneric obj25;
DPSBinObjGeneric obj26;
DPSBinObjGeneric obj27;
DPSBinObjGeneric obj28;
DPSBinObjGeneric obj29;
DPSBinObjGeneric obj30;
DPSBinObjGeneric obj31;
DPSBinObjGeneric obj32;
DPSBinObjGeneric obj33;
DPSBinObjGeneric obj34;
DPSBinObjGeneric obj35;
DPSBinObjGeneric obj36;
DPSBinObjGeneric obj37;
DPSBinObjGeneric obj38;
DPSBinObjGeneric obj39;
DPSBinObjGeneric obj40;
DPSBinObjGeneric obj41;
DPSBinObjGeneric obj42;
DPSBinObjGeneric obj43;
DPSBinObjGeneric obj44;
DPSBinObjGeneric obj45;
DPSBinObjGeneric obj46;
DPSBinObjGeneric obj47;
DPSBinObjGeneric obj48;
DPSBinObjGeneric obj49;
DPSBinObjGeneric obj50;
DPSBinObjGeneric obj51;
DPSBinObjGeneric obj52;
DPSBinObjGeneric obj53;
DPSBinObjGeneric obj54;
DPSBinObjGeneric obj55;
DPSBinObjGeneric obj56;
DPSBinObjGeneric obj57;
DPSBinObjGeneric obj58;
DPSBinObjGeneric obj59;
DPSBinObjGeneric obj60;
DPSBinObjGeneric obj61;
DPSBinObjGeneric obj62;
DPSBinObjGeneric obj63;
DPSBinObjGeneric obj64;
DPSBinObjGeneric obj65;
DPSBinObjGeneric obj66;
DPSBinObjGeneric obj67;
DPSBinObjGeneric obj68;
DPSBinObjGeneric obj69;
DPSBinObjGeneric obj70;
DPSBinObjGeneric obj71;
DPSBinObjGeneric obj72;
DPSBinObjGeneric obj73;
DPSBinObjGeneric obj74;
DPSBinObjGeneric obj75;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 20, 612,
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* EVB */
{DPS_EXEC|DPS_ARRAY, 0, 7, 552},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* DLB */
{DPS_EXEC|DPS_ARRAY, 0, 5, 512},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* DLRB */
{DPS_EXEC|DPS_ARRAY, 0, 9, 200},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* MLB */
{DPS_EXEC|DPS_ARRAY, 0, 2, 184},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* SLB */
{DPS_EXEC|DPS_ARRAY, 0, 3, 160},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99}, /* lineto */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_LITERAL|DPS_INT, 0, 0, 3},
{DPS_LITERAL|DPS_INT, 0, 0, -1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135}, /* roll */
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169}, /* sub */
{DPS_EXEC|DPS_ARRAY, 0, 30, 272},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72}, /* for */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56}, /* dup */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSW */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56}, /* dup */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSC */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56}, /* dup */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSX */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSY */
{DPS_LITERAL|DPS_INT, 0, 0, 2},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88}, /* index */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56}, /* dup */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSX1 */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* PSY1 */
{DPS_LITERAL|DPS_INT, 0, 0, 2},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88}, /* index */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75}, /* get */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99}, /* lineto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117}, /* pop */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99}, /* lineto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_INT, 0, 0, 2},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88}, /* index */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128}, /* rectfill */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129}, /* rectstroke */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[11] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"EVB",
"DLB",
"DLRB",
"MLB",
"SLB",
"PSW",
"PSC",
"PSX",
"PSY",
"PSX1",
"PSY1"};
long int *_dps_nameVals[11];
_dps_nameVals[0] = &_dpsCodes[0];
_dps_nameVals[1] = &_dpsCodes[1];
_dps_nameVals[2] = &_dpsCodes[2];
_dps_nameVals[3] = &_dpsCodes[3];
_dps_nameVals[4] = &_dpsCodes[4];
_dps_nameVals[5] = &_dpsCodes[5];
_dps_nameVals[6] = &_dpsCodes[6];
_dps_nameVals[7] = &_dpsCodes[7];
_dps_nameVals[8] = &_dpsCodes[8];
_dps_nameVals[9] = &_dpsCodes[9];
_dps_nameVals[10] = &_dpsCodes[10];
DPSMapNames(_dpsCurCtxt, 11, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.nameVal = _dpsCodes[0];
_dpsP[4].val.nameVal = _dpsCodes[1];
_dpsP[8].val.nameVal = _dpsCodes[2];
_dpsP[12].val.nameVal = _dpsCodes[3];
_dpsP[16].val.nameVal = _dpsCodes[4];
_dpsP[35].val.nameVal = _dpsCodes[5];
_dpsP[40].val.nameVal = _dpsCodes[6];
_dpsP[45].val.nameVal = _dpsCodes[7];
_dpsP[48].val.nameVal = _dpsCodes[8];
_dpsP[54].val.nameVal = _dpsCodes[9];
_dpsP[57].val.nameVal = _dpsCodes[10];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,612);
}
#line 108 "DrawViewWraps.psw"
/*** Called by -drawWraps ***/
/* Calls the operators from the wrap itself. */
#line 397 "DrawViewWraps.c"
void PSWEraseView(float BGColor, float BGStrColor, float BGStrWidth, float BGrect[])
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjReal obj4;
DPSBinObjGeneric obj5;
DPSBinObjReal obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
DPSBinObjGeneric obj9;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 10, 148,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGColor */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_ARRAY, 0, 4, 112}, /* param[const]: BGrect */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128}, /* rectfill */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGStrColor */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGStrWidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_LITERAL|DPS_ARRAY, 0, 4, 80}, /* param[const]: BGrect */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129}, /* rectstroke */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
register int _dps_offset = 80;
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.realVal = BGColor;
_dpsP[4].val.realVal = BGStrColor;
_dpsP[6].val.realVal = BGStrWidth;
_dpsP[8].val.arrayVal = _dps_offset;
_dps_offset += 4 * sizeof(DPSBinObjGeneric);
_dpsP[2].val.arrayVal = _dps_offset;
_dps_offset += 4 * sizeof(DPSBinObjGeneric);
_dpsF.nBytes = _dps_offset+4;
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,84);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
}
#line 118 "DrawViewWraps.psw"
/* Calls the operators from the wrap itself. */
#line 452 "DrawViewWraps.c"
void PSWDrawLine(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjGeneric obj1;
DPSBinObjReal obj2;
DPSBinObjGeneric obj3;
DPSBinObjReal obj4;
DPSBinObjReal obj5;
DPSBinObjGeneric obj6;
DPSBinObjReal obj7;
DPSBinObjReal obj8;
DPSBinObjGeneric obj9;
DPSBinObjGeneric obj10;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 11, 92,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineWidth */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineColor */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y1 */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99}, /* lineto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.realVal = LineWidth;
_dpsP[2].val.realVal = LineColor;
_dpsP[4].val.realVal = X;
_dpsP[5].val.realVal = Y;
_dpsP[7].val.realVal = X1;
_dpsP[8].val.realVal = Y1;
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,92);
}
#line 127 "DrawViewWraps.psw"
/*** Called by -drawWrapsBind ***/
/* Places the input args on the stack and calls the EraseViewBind procedure. */
#line 505 "DrawViewWraps.c"
void PSWEraseViewBind(float BGColor, float BGStrColor, float BGStrWidth, float BGrect[])
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjReal obj3;
DPSBinObjGeneric obj4;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 5, 76,
{DPS_LITERAL|DPS_ARRAY, 0, 4, 40}, /* param[const]: BGrect */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGStrWidth */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGStrColor */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: BGColor */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* EVB */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
register int _dps_offset = 40;
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"EVB"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[3].val.realVal = BGColor;
_dpsP[2].val.realVal = BGStrColor;
_dpsP[1].val.realVal = BGStrWidth;
_dpsP[4].val.nameVal = _dpsCodes[0];
_dpsP[0].val.arrayVal = _dps_offset;
_dps_offset += 4 * sizeof(DPSBinObjGeneric);
_dpsF.nBytes = _dps_offset+4;
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
}
#line 134 "DrawViewWraps.psw"
/* Places the input args on the stack and calls the DrawLineBind procedure. */
#line 560 "DrawViewWraps.c"
void PSWDrawLineBind(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjReal obj3;
DPSBinObjReal obj4;
DPSBinObjReal obj5;
DPSBinObjGeneric obj6;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 7, 60,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineColor */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineWidth */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* DLB */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"DLB"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[5].val.realVal = LineWidth;
_dpsP[4].val.realVal = LineColor;
_dpsP[2].val.realVal = X;
_dpsP[3].val.realVal = Y;
_dpsP[0].val.realVal = X1;
_dpsP[1].val.realVal = Y1;
_dpsP[6].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,60);
}
#line 139 "DrawViewWraps.psw"
/*** Called by -drawWrapsRepeat ***/
/* Defines input args, places the number of repetitions on the stack and then */
/* calls the DrawLineRepeatBind procedure. */
#line 619 "DrawViewWraps.c"
void PSWDrawLineRepeatBind(float W[], float C[], float X[], float Y[], float X1[], float Y1[], int i)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjGeneric obj4;
DPSBinObjGeneric obj5;
DPSBinObjGeneric obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
DPSBinObjGeneric obj9;
DPSBinObjGeneric obj10;
DPSBinObjGeneric obj11;
DPSBinObjGeneric obj12;
DPSBinObjGeneric obj13;
DPSBinObjGeneric obj14;
DPSBinObjGeneric obj15;
DPSBinObjGeneric obj16;
DPSBinObjGeneric obj17;
DPSBinObjGeneric obj18;
DPSBinObjGeneric obj19;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 20, 164,
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSW */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: W */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSC */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: C */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSX */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: X */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSY */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: Y */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSX1 */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: X1 */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* PSY1 */
{DPS_LITERAL|DPS_ARRAY, 0, 0, 160}, /* param[var]: Y1 */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_INT, 0, 0, 0}, /* param: i */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* DLRB */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[7] = {-1};
register int _dps_offset = 160;
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"PSW",
"PSC",
"PSX",
"PSY",
"PSX1",
"PSY1",
"DLRB"};
long int *_dps_nameVals[7];
_dps_nameVals[0] = &_dpsCodes[0];
_dps_nameVals[1] = &_dpsCodes[1];
_dps_nameVals[2] = &_dpsCodes[2];
_dps_nameVals[3] = &_dpsCodes[3];
_dps_nameVals[4] = &_dpsCodes[4];
_dps_nameVals[5] = &_dpsCodes[5];
_dps_nameVals[6] = &_dpsCodes[6];
DPSMapNames(_dpsCurCtxt, 7, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[1].length = i;
_dpsP[4].length = i;
_dpsP[7].length = i;
_dpsP[10].length = i;
_dpsP[13].length = i;
_dpsP[16].length = i;
_dpsP[18].val.integerVal = i;
_dpsP[0].val.nameVal = _dpsCodes[0];
_dpsP[3].val.nameVal = _dpsCodes[1];
_dpsP[6].val.nameVal = _dpsCodes[2];
_dpsP[9].val.nameVal = _dpsCodes[3];
_dpsP[12].val.nameVal = _dpsCodes[4];
_dpsP[15].val.nameVal = _dpsCodes[5];
_dpsP[19].val.nameVal = _dpsCodes[6];
_dpsP[16].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsP[13].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsP[10].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsP[7].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsP[4].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsP[1].val.arrayVal = _dps_offset;
_dps_offset += i * sizeof(DPSBinObjGeneric);
_dpsF.nBytes = _dps_offset+4;
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,164);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y1, i);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X1, i);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y, i);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X, i);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)C, i);
DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)W, i);
}
#line 151 "DrawViewWraps.psw"
/*** Called by -drawOptimizedStroke ***/
/* Places the input args on the stack and calls the MakeLineBind procedure. */
#line 743 "DrawViewWraps.c"
void PSWMakeLineBind(float X, float Y, float X1, float Y1)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjReal obj3;
DPSBinObjGeneric obj4;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 5, 44,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* MLB */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"MLB"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[2].val.realVal = X;
_dpsP[3].val.realVal = Y;
_dpsP[0].val.realVal = X1;
_dpsP[1].val.realVal = Y1;
_dpsP[4].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
}
#line 158 "DrawViewWraps.psw"
/* Places the input args on the stack and calls the StrokeLineBind procedure. */
#line 793 "DrawViewWraps.c"
void PSWStrokeLineBind(float LineWidth, float LineColor)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjReal obj1;
DPSBinObjGeneric obj2;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 3, 28,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineColor */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: LineWidth */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* SLB */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"SLB"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[1].val.realVal = LineWidth;
_dpsP[0].val.realVal = LineColor;
_dpsP[2].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
}
#line 163 "DrawViewWraps.psw"